﻿using System.Text;
using Abp.AutoMapper;
using FwProject.Core.FactoryInfo;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using FwProject.Core.TypeNumber;
using Abp.Domain.Entities.Auditing;
using System;
using Abp.Domain.Entities;
using System.ComponentModel;
using FwProject.Comm.ExcelUtil;
using AutoMapper;

namespace FwProject.TypeNumber.Dto
{
    [AutoMap(typeof(TypeNumberInfo))]
    [DisplayName(displayName:"货品型号表")]
    public class TypeNumberInfoDto : Entity<Guid>,ICreationAudited
    {
        [Display(Name ="所属工厂")]
        public Guid? FactoryinfoId { get; set; }
        [Display(Name = "所属模块")]
        public ModuleFlag ModuleFlag { get; set; } = ModuleFlag.产品模块;
   
        [Display(Name = "所属类型")]
        public AttributeFlag AttributeFlag { get; set; } = AttributeFlag.餐厅;
        /// <summary>
        /// 型号名称
        /// </summary>
        /// <value>The name.</value>
     
        [Display(Name = "名称")]
        [ExcelDateMember(IsMultiRow=false,IsMerged =false,IsClass =false)]
        [DisplayName(displayName:"型号名称")]
        public string Name { get; set; }
        /// <summary>
        /// 型号描述
        /// </summary>
        /// <value>The readme.</value>
       
        [Display(Name = "描述")]
        [ExcelDateMember(IsMultiRow = false, IsMerged = false,IsClass = false)]
        [DisplayName(displayName: "型号描述")]
        public string Readme { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        /// <value>The order list.</value>
       
        [Display(Name = "排序")]
        public int OrderList { get; set; } = 1;
        /// <summary>
        /// 单位
        /// </summary>
        /// <value>The unit.</value>
       
        [Display(Name = "单位")]
        [ExcelDateMember(IsMultiRow = false, IsMerged = false,IsClass = false)]
        [DisplayName(displayName: "单位")]
        public UnitFlag Unit { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        [Display(Name="数量")]
        [ExcelDateMember(IsMultiRow = false, IsMerged = false,IsClass = false)]
        [DisplayName(displayName: "数量")]
        public int Count { get; set; }

        [Display(Name = "默认装车型号")]
        [ExcelDateMember(IsMultiRow = false, IsMerged = false,IsClass =false)]
        [DisplayName(displayName: "默认装车型号")]
        public bool IsActive { get; set; } = true;

        /// <summary>
        /// 司机是否选中
        /// </summary>
        [IgnoreMap]
        public bool IsDevierSelect { get; set; } = false;

        public long? CreatorUserId { get; set; }
        public DateTime CreationTime { get; set; }
    }
}
